﻿@{
    ViewBag.Title = "Printers";
    List<DataCenter.PrinterData.Printer> printers = ViewBag.PrinterNames;
}
<div id="content">
    <ul id="printer-list">
       @* @foreach (var p in printers)
        {
            <li>
                <span>
                    <button class="print-btn" data-printer-name="@p.PrinterName">Print</button>
                </span>
                @p.PrinterName.ToUpper().PadRight(40, '.')@p.ClientID.PadLeft(50, '.')
            </li>
        }*@
    </ul>
</div>

@section scripts {
    <!--Script references. -->
    <!--The jQuery library is required and is referenced by default in _Layout.cshtml. -->
    <!--Reference the SignalR library. -->
    <script src="~/Scripts/jquery.signalR-2.1.0.min.js"></script>
    <!--Reference the autogenerated SignalR hub script. -->
    <script src="~/signalr/hubs"></script>
    <!--SignalR script to update the chat page and send messages.-->
    <script type="text/javascript">
        // First, checks if it isn't implemented yet.
        if (!String.prototype.format) {
            String.prototype.format = function () {
                var args = arguments;
                return this.replace(/{(\d+)}/g, function (match, number) {
                    return typeof args[number] != 'undefined'
                      ? args[number]
                      : match
                    ;
                });
            };
        }

        $(function () {
            


            //printer.client.enters = function (name) {
            //    $('#chats').append('<div class="border"><i>' + name + ' enters chatroom</i></div>');
            //    $("#users").append('<option value="' + name + '">' + name + '</option>');
            //    $('#onlineList').append('<div class="border">' + name + '</div>');
            //};
        });
    </script>
}